<#include '/admin/sonheader.html' > 
<#assign dateformat="com.enation.framework.directive.DateformateDirective"?new()>

<style>
.main .layui-input, .layui-textarea{
	width: 90%;
}
form {
    margin-bottom: 60px;
}
</style>

<div class="main">
	<form class="layui-form layui-form-pane" action="" id="payform" >
		<div class="shadowBoxWhite  whiteBox">
			<div class="detail">
				<table cellspacing="0" cellpadding="0" border="0" id="orderbasedata"
					style="width: 99%">
					<tbody  class="layui-table">
						<tr>
							<td>
								<div class="layui-form-item">
									<label class="layui-form-label">订单号：</label>
									<div class="layui-input-block">
										<input autocomplete="off" value="${(payment.order_sn)!''}" class="layui-input" type="text" disabled="disabled" >
									</div>
								</div>
							</td>
							<td>
								<div class="layui-form-item">
									<label class="layui-form-label">支付方式：</label>
									<div class="layui-input-block">
										<input  autocomplete="off" value="${payment.pay_method}" class="layui-input" type="text" disabled="disabled" >
									</div>
								</div>
							</td>
						</tr>
						<tr>
							<td>
								<div class="layui-form-item">
									<label class="layui-form-label">订单金额：</label>
									<div class="layui-input-block">
										<input  autocomplete="off" value="${ord.order_amount?string('#.##')}" class="layui-input" type="text" disabled="disabled" >
									</div>
								</div>
							</td>
							<td>
								<div class="layui-form-item">
									<label class="layui-form-label">付款人：</label>
									<div class="layui-input-block">
										<input  autocomplete="off" value="${payment.pay_user}" class="layui-input" type="text" disabled="disabled" >
									</div>
								</div>
							</td>
						</tr>
						<tr>
							<td>
								<div class="layui-form-item">
									<label class="layui-form-label">应付款  ￥：</label>
									<div class="layui-input-block">
										<input autocomplete="off" value="${payment.money?string('#.##')}" class="layui-input" type="text" disabled="disabled" >
									</div>
								</div>
							</td>
							<td>
								<div class="layui-form-item">
									<label class="layui-form-label">已结算金额  ￥：</label>
									<div class="layui-input-block">
										<input autocomplete="off" value="${payment.paymoney?string('#.##')!''}" class="layui-input" type="text" disabled="disabled" >
									</div>
								</div>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
			<br>
			<div class="detail">
				<table class="layui-table">
					<colgroup>
						<col width="250">
						<col width="200">
						<col>
					</colgroup>
					<thead>
						<tr>
							<th>付款日期</th>
							<th>付款金额</th>
							<th>操作人</th>
						</tr>
					</thead>
					<tbody>
						<#list paymentList as item>
						<tr>
							<td><@dateformat pattern="yyyy-MM-dd HH:mm:ss"
								time="${item.pay_date?c}" /></td>
							<td>${item.pay_money?string('#.##')!''}</td>
							<td>${item.admin_user}</td>
						</tr>
						</#list>
					</tbody>
				</table>
				<center>
					<div class="layui-form-item">
						<label class="layui-form-label">本次付款：</label>
						<div class="layui-input-block">
							<input name="paymoney" id="paymoney" lay-verify="required" autocomplete="off" onkeyup="value=value.replace(/[^\d.]/g,'')"
							 value="${showMoney?string('#.##')}" class="layui-input" type="text" <#if showMoney==0>disabled="disabled"</#if> /> 
						</div>
					</div>
					<input type="hidden" value="${payment_id}" name="payment_id" /> 
					<input type="hidden" value="${ord.order_id}" name="orderId" />
				</center>
			</div>
		</div>
		<div class="layui-layer-btn layui-layer-btn-" style="padding:8px 12px;background:rgba(230,230,230,0.8);"> 
  			<a class="layui-layer-btn0" type="submit" lay-submit="" lay-filter="payBtn">保存</a>
  			<a class="layui-layer-btn1">取消</a>
  		</div>
	</form>
</div>

<script>
var index = parent.layer.getFrameIndex(window.name);

layui.use('form', function(){
	  var form = layui.form();
	  
	  
	  //监听提交
	  form.on('submit(formDemo)', function(data){
	    layer.msg(JSON.stringify(data.field));
	    return false;
	  });
	});
</script>

<script type="text/javascript" src="${ctx}/shop/admin/js/OrderDetail.js"></script>
